package com.wrl.mmall.service;

import com.wrl.mmall.common.ServerResponse;
import com.wrl.mmall.pojo.User;

/**
 * Created by Wang Renlei on 2018/8/22.
 */
public interface IUserService {
    //登陆
    ServerResponse<User> login(String username, String password);
    //注册
    ServerResponse<String> registerUser(User user);
    //校验用户的邮箱或账号
    ServerResponse<String> checkValid(String str, String type);
    //查询密保问题
    ServerResponse<String> selectQuestion(String username);
    //验证密保问题，
    ServerResponse<String> forgetCheckAnswer(String username, String question, String answer);
    //验证成功后修改密码
    ServerResponse<String> forgetResetPassword(String username, String passwordNew, String token);
    //登陆状态下重置密码
    ServerResponse<String> resetPassword(String oldPassword, String newPassword, User user);
    //修改用户信息
    ServerResponse<User> updateUserInfo(User user);
    //获取用户信息，强制登陆
    ServerResponse<User> getUserInformation(Integer userId);

    //验证是否为管理员
    ServerResponse checkAdminRole(User user);
}
